package com.hangsu.train.components.dao;

import com.hangsu.train.components.entity.Device;
import com.hangsu.train.components.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DeviceDao {

    int deleteByPrimaryKey(Long id);

    int insert(Device row);

    Device selectByPrimaryKey(Long id);

    List<Device> selectAll();

    int updateByPrimaryKey(Device row);

    int updateSelective(Device row);

    /**
     * 搜索用户列表
     *
     * @param device
     * @param skip
     * @param limit
     * @return
     */
    List<Device> list(@Param("user") Device device, @Param("skip") long skip, @Param("limit") int limit);

    /**
     * 统计用户数量
     *
     * @param device
     * @return
     */
    long count(@Param("user") Device device);
}